﻿using AutoTest.Common.UtilsHelper;
using EasyTool;
using SqlSugar;

namespace AutoTest.Domain.Entities
{
	/// <summary>
	/// 订单日志
	/// </summary>
	[SugarTable("t_order_log", TableDescription = "订单日志")]
	public class OrderLog : AllBaseEntity
	{
		/// <summary>
		/// 构造函数
		/// </summary>
		public OrderLog()
		{
			Id = IdHelper.NextId();
			this.OrderId = string.Empty; ;
			this.OrderOperate = string.Empty;
			this.CreateTime = DateTime.Now;
			this.UserId = 0;
		}
		/// <summary>
		/// 构造函数
		/// </summary>
		/// <param name="orderid"></param>
		/// <param name="orderOperate"></param>
		/// <param name="userid"></param>
		public OrderLog(string orderid,string orderOperate,long userid)
        {
            Id = IdHelper.NextId();
            this.OrderId = orderid;
			this.OrderOperate = orderOperate;
			this.CreateTime = DateTime.Now;
			this.UserId = userid;
			this.OrderResult1 = string.Empty;
			this.OrderResult2 = string.Empty;
		}

		///<summary>
		/// 主键Id
		///</summary>
		[SugarColumn(IsPrimaryKey = true, ColumnName = "id", ColumnDescription = "主键Id")]
		public long Id { get; set; } = 0;
		///<summary>
		/// 订单号
		///</summary>
		[SugarColumn(ColumnName = "order_id", ColumnDescription = "订单号")]
		public string OrderId { get; set; } = string.Empty;
		///<summary>
		/// 订单操作
		///</summary>
		[SugarColumn(ColumnName = "order_operate", ColumnDescription = "订单操作")]
		public string OrderOperate { get; set; }
		///<summary>
		/// 操作时间
		///</summary>
		[SugarColumn(ColumnName = "create_time", ColumnDescription = "操作时间")]
		public DateTime CreateTime { get; set; }
		///<summary>
		/// 操作人，系统采用-9999
		///</summary>
		[SugarColumn(ColumnName = "user_id", ColumnDescription = "操作人，系统采用-9999")]
		public long UserId { get; set; }
		/// <summary>
		/// 操作结果1
		/// </summary>
		[SugarColumn(ColumnName = "order_result1", ColumnDescription = "操作结果1")]
		public string OrderResult1 { get; set; } = string.Empty;
		/// <summary>
		/// 操作结果2
		/// </summary>
		[SugarColumn(ColumnName = "order_result2", ColumnDescription = "操作结果2")]
		public string OrderResult2 { get; set; } = string.Empty;
	}
}
